"""
@-*- coding: utf-8 -*-
@ python: 3.12.3
@ 创建者: JacksonCode
@ 创建时间: 2024/12/21
"""
import numpy as np

array = np.array([1, 2, 3])
print(array)

array2 = np.arange(10)
print(array2)

array3 = np.arange(2, 20, 2)
print(array3)

array4 = np.arange(2, 20, 2, dtype=np.float32)
print(array4)

array = np.linspace(0, 10, 20)
print(array)

array2 = np.logspace(0, 1, 5)
print(array2)

print(np.linspace(-10, 10, 5))

x = np.linspace(-10, 10, 5)
y = np.linspace(-10, 10, 5)
x, y = np.meshgrid(x, y)
print(x)
print(y)

# 向量
r = np.r_[0:10:1]
print(r)
c = np.c_[0:10:1]
print(c)
